home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_06 / 2n06018d < prev    next >
Text File  |  1991-04-28  |  432b  |  23 lines

  1. #include <stdio.h>
  2. #include "snooper.h"
  3.  
  4. static char buffer[BUFSIZ];
  5.  
  6. void called(int x)
  7. {
  8.     /* Prints formatted string to file "debug.000" ... */
  9.     __BREAK(__FIL0__,d_printf("called(): arg = %d\n", x));
  10.  
  11.     /* continue ..... */
  12. }
  13.  
  14. void main(void)
  15. {
  16.     int i;
  17.     fp = fopen("testfile", "r" );
  18.     fread(buffer,1,BUFSIZ,fp);
  19.     for( i = 0 ; i < BUFSIZ ; ++i ) {
  20.         called((int) buffer[i]);
  21.     }
  22. }
  23.